package com.matt.docpro.service;

import com.matt.docpro.mapper.OutcomeMapper;
import com.matt.docpro.model.Clinic;
import com.matt.docpro.model.Doctor;
import com.matt.docpro.model.Outcome;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * FeedbackService
 * Created by on 2024/03/06.
 */
@Service
public class OutcomeService {
    @Autowired
    OutcomeMapper outcomeMapper;
    public Outcome get(Outcome outcome) {
        return outcomeMapper.get(outcome);
    }

    // 出诊追加
    public void insert(Outcome outcome) {
        outcomeMapper.insert(outcome);
    }
    // 出诊更新状态
    public void updateState(Outcome outcome) {
        outcomeMapper.updateState(outcome);
    }

    // 图表画面用
    public List<Outcome> getAllDate() {
        return outcomeMapper.getAllDate();
    }
    // 图表画面用
    public List<Clinic> getAllClinic() {
        return outcomeMapper.getAllClinic();
    }
    // 出诊首页显示
    public List<Outcome> getOutcomeByDateRangeClinicDocStage(String strDt, String endDt, String clinicId, String docId, int stage) {
        return outcomeMapper.getOutcomeByDateRangeClinicDocStage(strDt, endDt, clinicId, docId, stage);
    }
    // 图表画面用
    public List<Outcome> getOutcomeByDateAndClinic(String date, String clinicId) {
        return outcomeMapper.getOutcomeByDateAndClinic(date, clinicId);
    }
    // 挂号画面用，获取医生出诊信息
    public List<Doctor> getOutcomeDocByDate(String date, String clinicId) {
        return outcomeMapper.getOutcomeDocByDate(date, clinicId);
    }
}
